home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / manageme / tcpdump-.001 / tcpdump-~ / tcpdump-3.0.2-linux / tcpdump-3.0.2 / fddi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-15  |  2.8 KB  |  77 lines

  1. /*
  2.  * Copyright (c) 1992, 1993, 1994
  3.  *    The Regents of the University of California.  All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that: (1) source code distributions
  7.  * retain the above copyright notice and this paragraph in its entirety, (2)
  8.  * distributions including binary code include the above copyright notice and
  9.  * this paragraph in its entirety in the documentation or other materials
  10.  * provided with the distribution, and (3) all advertising materials mentioning
  11.  * features or use of this software display the following acknowledgement:
  12.  * ``This product includes software developed by the University of California,
  13.  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  14.  * the University nor the names of its contributors may be used to endorse
  15.  * or promote products derived from this software without specific prior
  16.  * written permission.
  17.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  18.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  19.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  20.  *
  21.  * @(#) $Header: fddi.h,v 1.6 94/06/14 20:12:35 leres Exp $ (LBL)
  22.  */
  23.  
  24. /*
  25.  * Based on Ultrix if_fddi.h
  26.  */
  27.  
  28. /*
  29.  * This stuff should come from a system header file, but there's no
  30.  * obviously portable way to do that and it's not really going
  31.  * to change from system to system (except for the padding business).
  32.  */
  33.  
  34. struct fddi_header {
  35. #if defined(ultrix) || defined(__alpha)
  36.     /* Ultrix pads to make everything line up on a nice boundary */
  37. #define    FDDIPAD    3
  38.     u_char  fddi_ph[FDDIPAD];
  39. #else
  40. #define    FDDIPAD    0
  41. #endif
  42.     u_char  fddi_fc;        /* frame control */
  43.     u_char  fddi_dhost[6];
  44.     u_char  fddi_shost[6];
  45. };
  46.  
  47.  
  48. /* Useful values for fddi_fc (frame control) field */
  49.  
  50. /*
  51.  * FDDI Frame Control bits
  52.  */
  53. #define    FDDIFC_C        0x80        /* Class bit */
  54. #define    FDDIFC_L        0x40        /* Address length bit */
  55. #define    FDDIFC_F        0x30        /* Frame format bits */
  56. #define    FDDIFC_Z        0x0f        /* Control bits */
  57.  
  58. /*
  59.  * FDDI Frame Control values. (48-bit addressing only).
  60.  */
  61. #define    FDDIFC_VOID        0x40        /* Void frame */
  62. #define    FDDIFC_NRT        0x80        /* Nonrestricted token */
  63. #define    FDDIFC_RT        0xc0        /* Restricted token */
  64. #define    FDDIFC_SMT_INFO        0x41        /* SMT Info */
  65. #define    FDDIFC_SMT_NSA        0x4F        /* SMT Next station adrs */
  66. #define    FDDIFC_MAC_BEACON    0xc2        /* MAC Beacon frame */
  67. #define    FDDIFC_MAC_CLAIM    0xc3        /* MAC Claim frame */
  68. #define    FDDIFC_LLC_ASYNC    0x50        /* Async. LLC frame */
  69. #define    FDDIFC_LLC_SYNC        0xd0        /* Sync. LLC frame */
  70. #define    FDDIFC_IMP_ASYNC    0x60        /* Implementor Async. */
  71. #define    FDDIFC_IMP_SYNC        0xe0        /* Implementor Synch. */
  72. #define FDDIFC_SMT        0x40        /* SMT frame */
  73. #define FDDIFC_MAC        0xc0        /* MAC frame */
  74.  
  75. #define    FDDIFC_CLFF        0xF0        /* Class/Length/Format bits */
  76. #define    FDDIFC_ZZZZ        0x0F        /* Control bits */
  77.